import component from "element-plus/es/components/tree-select/src/tree-select-option.mjs";
import { createRouter, createWebHistory } from "vue-router";

const routes = [
  {
    path: "/",
    name: "index",
    component: () => import("@/layout/index.vue"),
    children: [
      {
        path: "/mine",
        name: "mine",
        component: () => import("@/views/mine/index.vue"),
      },
      {
        path: "/recommend",
        name: "recommend",
        component: () => import("@/views/recommend/Recommend.vue"),
      },
      {
        path: "/MusicList",
        name: "MusicList",
        component: () => import("@/views/musicList/MusicList.vue"),
      },
      {
        path: "/Artist",
        name: "Artist",
        component: () => import("@/views/artist/Artist.vue"),
      },
    ],
  },
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/user/login.vue"),
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
